import java.util.Scanner;
public class Admin extends User {
    public Admin(String username, String password) {
        super(username, password);
    }
    public void changePassword(Scanner scanner) {
        System.out.print("请输入当前密码：");
        String currentPassword = scanner.nextLine();

        if (!currentPassword.equals(this.getPassword())) {
            System.out.println("当前密码错误。");
            return;
        }

        System.out.print("请输入新密码：");
        String newPassword = scanner.nextLine();
        this.setPassword(newPassword);
        System.out.println("密码修改成功！");
    }
    public void resetCustomerPassword(Customer customer) {
        String defaultPassword = "newpassword123";
        customer.setPassword(defaultPassword);
        System.out.println("用户 " + customer.getUsername() + " 的密码已重置为: " + defaultPassword);
    }
}